/**
 * @file factorylib.h
 * \brief Interface for Factory of sdlib (Select Dynamic Library).
 *
 *  Created on: Feb 25, 2012
 *  @author: Francesco Corvino
 */

#ifndef FACTORYLIB_H_
#define FACTORYLIB_H_

#include <stdlib.h>
#include <string.h>

#include "proxysdlib.h"

/**
 *
 */
typedef struct descrFun {
	char *name;
	HANDLER_FUN funpointer;
	char valid;
} DescrFun;

/**
 * \brief Struttura dati descrittiva di una libreria caricata in memoria.
 */
typedef struct descrLib {
	int idLib;
	char * name;
	char * path;
	HANDLER_LIB libpointer;
	int type;
	DescrFun* functions;
} DescrLib;

void initialize();

void terminate();

void deleteLib(int idLib);

int loadLib(DescrLib * lib);

DescrLib * getLibrary(int idLib);

void setLoggingFunc(void (*funlog)(char*));

#endif /* FACTORYLIB_H_ */
